package com.hitqz.robot.biz.config;

import jakarta.annotation.PostConstruct;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Primary;
import org.springframework.stereotype.Component;

@Component
@ConfigurationProperties(prefix = "patrol")
@Primary
@Data
@Slf4j
public class PatrolProperties {
	/**
	 * 最大存储时间，单位：天
	 */
	private Integer maxHistory = 30 * 3; // 默认值为 3个月

	/**
	 * 最大存储大小，单位：GB
	 */
	private Integer maxSize = 500 ; // 默认值为 500GB

    @PostConstruct
    public void init() {
    	log.info("巡检配置:最大存储大小 {} GB, 最大存储时间:{} 天",maxSize,maxHistory);
    }

}